<template>
  <div>
    <button @click="onClick">{{props.text}}</button>
    <!-- <button>{{props.text}}</button> -->
  </div>
</template>

<script>
  import { defineComponent } from 'vue'
  export default defineComponent({
    //仍然可以像2.0那样接收
    props: {
      text: String
    },
    setup(props, {emit}) {
      const onClick = () => {
        console.log('...inner click...');
        emit('outClick', Date.now())
      }

      return {
        props,
        onClick
      }
    }
  })
</script>

<style></style>